﻿using UnityEngine;
using System.Collections;

public class ClickPoint : MonoBehaviour
{
	public GameManager gameManager;
	private bool checkClick = true;
	// Use this for initialization
	void Start ()
	{
	
	}
	
	// Update is called once per frame
	void Update ()
	{
	
	}

	public void SetCheckClick(bool check)
	{
		checkClick = check;
	}

	void OnMouseDown() {
		Debug.Log ("ClickPoint");
		if (checkClick) {
			iTween.PunchScale(gameObject,iTween.Hash("amount",new Vector3(40, 40, 1),"time",0.5f));
			gameManager.SetPoint (gameObject);
		}

	}
}

